package com.example.lab2.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class AppDBOpenHelper extends SQLiteOpenHelper {
    public static final String DATABASE_NAME="todolist.db";
    public AppDBOpenHelper(@Nullable Context context) {
        super(context, DATABASE_NAME, null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        sqLiteDatabase.execSQL(TodolistContract.SQL_CREATE_ENTRIES);
    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldversion, int newversion) {
//        sqLiteDatabase.execSQL(TodolistContract.SDL_DELETE_ENTRIES);
//        onCreate(sqLiteDatabase);
    }


}
